package com.app.mapper;

import com.app.model.PlanFundsModel;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface PlanMapper extends BaseMapper<PlanFundsModel> {
    List<PlanFundsModel> selectPlan(PlanFundsModel model);

    int selectPlanCount(PlanFundsModel model);

    List<PlanFundsModel> selectPlanByTime(PlanFundsModel model);

    int selectPlanByTimeCount(PlanFundsModel model);

    List<PlanFundsModel> selectPlanByStatus(PlanFundsModel model);

    int selectPlanByStatusCount(PlanFundsModel model);

    void updatePlan(PlanFundsModel model);

    List<PlanFundsModel> select(int departmentId);

    @Insert("insert into lm_plan_funds(department_id,task_plan,year,status) values(#{departmentId},#{taskPlan},#{year},#{status})")
    void insertPlan(Double taskPlan,String year,int departmentId,Integer status);

    int selectPlanCount1(PlanFundsModel model);

    List<PlanFundsModel> getFund(String year);

    List<PlanFundsModel> getList();

}
